package com.ru.application.creditscore.bean;

import java.util.List;
import com.ru.application.creditscore.dao.support.SearchParameters;
import com.ru.application.creditscore.domain.ScoringSchema;
import com.ru.application.creditscore.service.ScoringSchemaService;

public class SchemaBean extends BaseBean<ScoringSchema> {
 
    private static final long serialVersionUID = 1L;
    private boolean chkDelete;
    private ScoringSchemaService schemaService;
    
    public SchemaBean() {
	super(new ScoringSchema());   
    }
    
    public Integer getId() {
        return ((ScoringSchema)this.getType()).getId();
    }

    public void setId(Integer id) {
	((ScoringSchema)this.getType()).setId(id);
    }
    
    public String getName() {
        return ((ScoringSchema)this.getType()).getName();
    }

    public void setName(String name) {
	((ScoringSchema)this.getType()).setName(name);
    }
    
    public void save() {
	
    }

    public boolean isChkDelete() {
        return chkDelete;
    }

    public void setChkDelete(boolean chkDelete) {
        this.chkDelete = chkDelete;
    }

    public ScoringSchemaService getSchemaService() {
        return schemaService;
    }

    public void setSchemaService(ScoringSchemaService schemaService) {
        this.schemaService = schemaService;
    }
    
    public List<ScoringSchema> listSchema() {
	SearchParameters sp = new SearchParameters();
	sp.setFirstResult(0);
	sp.setMaxResults(5);
	List<ScoringSchema> result = schemaService.findAll(sp);
	return result;
    }
}
